import time
from machine import SoftI2C, Pin
from esp32_i2c_1602lcd import I2cLcd

DEFAULT_I2C_ADDR = 0x27 # 屏幕地址为 可控制 i2c.scan()
i2c = SoftI2C(sda=Pin(4),scl=Pin(5),freq=100000)

lcd = I2cLcd(i2c, DEFAULT_I2C_ADDR, 2, 16)

# 需要调整对比度 不然可能显示不了信息 对比度在显示屏上

for i in range(1, 10):
    lcd.clear()
    lcd.putstr("loading...{}\n".format(i))
    lcd.putstr("wangmingdong")
    time.sleep(1)